package com.amado.course31;

public class EqualsTest {
	public static void main(String[] args) {
		Student student1 = new Student("张三", 12);
		Student student2 = new Student("张三", 12);
		System.out.println(student1);
		System.out.println(student2);
		System.out.println(student1.equals(student2));
		System.out.println(student1.equals(student1));
		
		
		Student2 student22 = new Student2("张三", 12);
		Student2 student23 = new Student2("张三", 12);
		System.out.println(student22.equals(student23));
		
	}
}
